<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ include file="./tag.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<title>用户注册</title>
		<link type="text/css" rel="stylesheet" href="${ctx }/css/validator.css"></link>
		<link type="text/css" rel="stylesheet" href="${ctx }/css/tipswindown.css"></link>
		<script src="${ctx }/js/jquery.js" type="text/javascript"></script>
		<script src="${ctx }/js/tipswindown.js" type="text/javascript"></script>
		<script src="${ctx }/js/formValidator.js" type="text/javascript" charset="UTF-8"></script>
		<script src="${ctx }/js/formValidatorRegex.js" type="text/javascript" charset="UTF-8"></script>
		<script language="javascript" src="${ctx }/js/DateTimeMask.js" type="text/javascript"></script>
		<style type="text/css">
<!--
body {
	background-color: #F5C418;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
		<link href="${ctx }/sys/css/angel/css.css" rel="stylesheet" type="text/css" />
		<style type="text/css">
<!--
.STYLE2 {
	color: #000000
}

.STYLE3 {
	color: #FFFFFF
}

a {
	color: #5d5c5c;
}

a:hover {
	color: #000000;
}

.input1 {
	margin: -2px 15px 0 2px;
	background: transparent;
	border: 0px;
	width: 140px;
	height: 21px
}

.input2 {
	margin: -2px 15px 0 2px;
	background: transparent;
	border: 0px;
	width: 56px;
	height: 21px
}

.input3 {
	margin: -2px 15px 0 2px;
	background: transparent;
	border: 0px;
	width: 130px;
	height: 21px
}

.input4 {
	margin: -2px 15px 0 2px;
	background: transparent;
	border: 0px;
	width: 180px;
	height: 21px
}

.input5 {
	margin: -2px 15px 0 2px;
	background: transparent;
	border: 0px;
	width: 240px;
	height: 21px
}
-->
</style>


		<script type="text/javascript">
$(document).ready(function(){
	//$.formValidator.initConfig({onerror:function(){alert("校验没有通过，具体错误请看错误提示")}});
	$.formValidator.initConfig({formid:"form1",onerror:function(msg){tipsWindown("提示","text:"+msg,"250","150","false","","true","msg")},onsuccess:function(){}});
	$("#regId").formValidator({onshow:"请输入用户名",onfocus:"用户名至少4个字符,最多10个字符",oncorrect:"该用户名可以注册"}).inputValidator({min:4,max:10,onerror:"用户名至少4个字符,最多10个字符"}).regexValidator({regexp:"username",datatype:"enum",onerror:"用户名格式不正确"})
		.ajaxValidator({
	    type : "GET",
		url : "${ctx}/check.do",
		datatype : "json",
		success : function(data){
            if( data == "1" )
			{
                return true;
			}
            else
			{
                return false;
			}
		},
		buttons: $("#button"),
		error: function(){alert("服务器没有返回数据，可能服务器忙，请重试");},
		onerror : "该用户名不可用，请更换用户名",
		onwait : "正在对用户名进行合法性校验，请稍候..."
	});
	$("#userRn").formValidator({onshow:"请输入你的真实姓名",onfocus:"请正确填写真实姓名，以备发送中奖信息之用",oncorrect:"恭喜你,你输对了"}).inputValidator({max:10,onerror:"真实姓名字数必须在5个汉字之内,请确认"}).regexValidator({regexp:"chinese",datatype:"enum",onerror:"真实姓名格式不正确,只能为汉字"});
	$("#password1").formValidator({onshow:"请输入密码",onfocus:"密码不能为空",oncorrect:"密码合法"}).inputValidator({min:5,empty:{leftempty:false,rightempty:false,emptyerror:"密码两边不能有空符号"},onerror:"密码至少5个字符,请确认"});
	$("#password2").formValidator({onshow:"请输入重复密码",onfocus:"两次密码必须一致哦",oncorrect:"密码一致"}).inputValidator({min:5,empty:{leftempty:false,rightempty:false,emptyerror:"重复密码两边不能有空符号"},onerror:"重复密码至少5个字符,请确认"}).compareValidator({desid:"password1",operateor:"=",onerror:"2次密码不一致,请确认"});
	$("#email").formValidator({onshow:"请输入邮箱",onfocus:"请正确填写邮箱，以备发送中奖信息之用",oncorrect:"恭喜你,你输对了",defaultvalue:"@"}).inputValidator({min:6,max:100,onerror:"你输入的邮箱长度非法,请确认"}).regexValidator({regexp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",onerror:"你输入的邮箱格式不正确"});
	$("#shouji").formValidator({onshow:"请输入你的手机号码",onfocus:"请正确填写手机号码，以备发送中奖信息之用",oncorrect:"谢谢你的合作"}).inputValidator({min:11,max:11,onerror:"手机号码必须是11位的,请确认"}).regexValidator({regexp:"mobile",datatype:"enum",onerror:"你输入的手机号码格式不正确"});;
	$("#ms").formValidator({onshow:"请输入你的联系地址",onfocus:"请正确填写联系地址，以备发送中奖信息之用",oncorrect:"恭喜你,你输对了"}).inputValidator({min:1,max:200,onerror:"联系地址字数必须在1-200个字符之间,请确认"});

$('#button2').click(function(){
     $('#form3')[0].action = '${ctx}/reg.do';
     $('#form3')[0].submit();
})
});
</script>
	</head>

	<body>
<table width="950" border="0" align="center" cellpadding="0"
	cellspacing="0">
	<tr>
		<td width="951" align="center">
			<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
				codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
				width="950" height="540">
				<param name="movie"
					value="${ctx}/sys/images/angel/images/banner.swf" />
				<param name="quality" value="high" />
				<embed src="${ctx}/sys/images/angel/images/banner.swf"
					quality="high"
					pluginspage="http://www.macromedia.com/go/getflashplayer"
					type="application/x-shockwave-flash" width="950" height="540"></embed>
			</object>
		</td>
	</tr>
</table>
<table width="1010" height="79" border="0" align="center"
	cellpadding="0" cellspacing="0">
	<tr>
		<td align="center" valign="bottom"
			background="${ctx}/sys/images/angel/images/table-bg.gif">
			<table width="70%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td height="40">
						<a href="#"><img
								src="${ctx}/sys/images/angel/images/title-01.gif" width="120"
								height="39" border="0" /> </a>
					</td>
					<td>
						<img src="${ctx}/sys/images/angel/images/table-01.gif" width="2"
							height="38" />
					</td>
					<td>
						<a href="#"><img
								src="${ctx}/sys/images/angel/images/title-02.gif" width="120"
								height="39" border="0" /> </a>
					</td>
					<td>
						<img src="${ctx}/sys/images/angel/images/table-01.gif" width="2"
							height="38" />
					</td>
					<td>
						<a href="#"><img
								src="${ctx}/sys/images/angel/images/title-03.gif" width="120"
								height="39" border="0" /> </a>
					</td>
					<td>
						<img src="${ctx}/sys/images/angel/images/table-01.gif" width="2"
							height="38" />
					</td>
					<td>
						<a href="#"><img
								src="${ctx}/sys/images/angel/images/title-04.gif" width="120"
								height="39" border="0" /> </a>
					</td>
					<td>
						<img src="${ctx}/sys/images/angel/images/table-01.gif" width="2"
							height="38" />
					</td>
					<td>
						<a href="#"><img
								src="${ctx}/sys/images/angel/images/title-05.gif" width="120"
								height="39" border="0" /> </a>
					</td>
					<td>
						<img src="${ctx}/sys/images/angel/images/table-01.gif" width="2"
							height="38" />
					</td>
					<td>
						<a href="#"><img
								src="${ctx}/sys/images/angel/images/title-06.gif" width="120"
								height="39" border="0" /> </a>
					</td>
				</tr>

			</table>
		</td>
	</tr>
</table>
<form id="form3" action="${ctx }/login.do" method="post">
	<input type="hidden" name="link" value="${link }" />
	<table width="950" height="39" border="0" align="center"
		cellpadding="0" cellspacing="0">
		<tr>
			<td width="222" align="right" valign="bottom"
				background="${ctx}/sys/images/angel/images/table-two-bg.gif">
				<img style="margin: 0px 7px 3px 0px"
					src="${ctx}/sys/images/angel/images/table-two-01.gif" width="180"
					height="25" />
			</td>
			<td align="left" valign="bottom"
				background="${ctx}/sys/images/angel/images/table-two-bg.gif">
				&nbsp;
			</td>
			<td align="right" valign="bottom"
				background="${ctx}/sys/images/angel/images/table-two-bg.gif">
				<table style="margin: 0px 7px 3px 0px" width="445" border="0"
					cellpadding="0" cellspacing="0" class="ab10-12">
					<tr>
						<td align="left">
							<select name="selType" size="1" class="daohang-12-20">
								<option value="1">
									网友登陆
								</option>
								<option value="2">
									参赛选手登陆
								</option>
							</select>
						</td>
						<td width="130">
							用户名
							<input class="test" name="regid" type="text" size="10" maxlength="10"/>
						</td>
						<td width="130">
							密码
							<input class="test" name="pwd" type="password" size="10" maxlength="10"/>
						</td>
						<td width="35">
							<input type="submit" name="button" id="button1" value="登陆" />
						</td>
						<td width="35">
							<input type="button" name="reg" id="button2" value="注册" />
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</form>
		<table width="950" height="276" border="0" align="center"
			cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
			<tr>
				<td width="222" align="right" valign="top">
					<table width="180" height="221" border="0" cellpadding="0"
						cellspacing="0"
						background="${ctx }/sys/images/angel/images/table-three-bg.gif"
						style="margin: 5px 7px 0px 0px">
						<tr>
							<td height="64" align="right" valign="bottom">
								<table width="179" border="0" cellpadding="0" cellspacing="0"
									class="song-12-20" style="margin: 0px 0px 5px 0px">
									<tr>
										<td width="91" height="23" valign="bottom" bgcolor="#AC8F55">
											<span class="STYLE2"> 呢称</span>
										</td>
										<td width="40" valign="bottom" bgcolor="#AC8F55">
											<span class="STYLE3">票数</span>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td align="right" valign="bottom">
								<table width="80%" border="0" cellpadding="0" cellspacing="0"
									class="song-12-20" style="margin: 0px 10px 10px 0px">
                                <c:forEach items="${voteList}" var="vote" step="1" end="8">
									<tr>
										<td width="91">
											${vote.nkName }
										</td>
										<td width="45">
											<span class="STYLE1">${vote.allVoteNum }</span>
										</td>
									</tr>
									</c:forEach>
								</table>
							</td>
						</tr>
					</table>
					<br />
				</td>












				<td align="left" valign="top">
						<form action="${ctx }/register.do" method="post" name="form1" id="form1">
					<table width="100%" height="285" border="0" cellpadding="0"
						cellspacing="0"
						background="${ctx }/sys/images/angel/images/02-bg-02.gif"
						style="background-repeat: no-repeat">
						<tr>
							<td align="left" valign="bottom">
								<div
									style="background: url(${ctx }/sys/images/angel/images/04-bg-04.gif) no-repeat; margin-bottom: 30px">
									<table style="margin: 18px 0px 0px 18px" width="665" border="0"
										cellspacing="0" cellpadding="0">
										<tr>
											<td width="310" height="22" style="background-color: ">
												<img src="${ctx }/sys/images/angel/images/04_title_01.gif" />
											</td>
										</tr>
										<tr>
											<td align="left" valign="top">
												<div
													style="margin-top: 16px; background: url(${ctx }/sys/images/angel/images/03_bg_012.gif) no-repeat; width: 643px; height: 22px; font: 12px #3f3f3f; font-weight: bold; padding: 6px 0 17px 7px">
													请填写个人资料
												</div>
												<table border="0" cellpadding="0" cellspacing="0"
													style="border-bottom: #e7e7e7 1px solid; width: 655px; background: url(${ctx }/sys/images/angel/images/04_bg_01.gif) no-repeat; height: 213px">
													<tr>
														<td align="left" valign="top"
															style="padding: 6px 0 12px 7px; font: 12px '宋体'; font-color: #5b5b5b">
															<table border="0" cellpadding="0" cellspacing="0"
																style="margin: -6px 0 0 60px">
																<tr>
																	<td style="padding: 3px 0 0 0px">
																		<input name="regId" type="text" class="input1" id="regId"/>
																	</td>
																	<td>
                                                                        <div id="regIdTip" style="width: 250px"></div>
																	</td>
																</tr>
															</table>
															<table border="0" cellpadding="0" cellspacing="0"
																style="margin: 5px 0 0 75px">
																<tr>
																	<td style="padding: 6px 0 0 0px">
																		<input name="userRn" type="text" class="input3" id="userRn"/>
																	</td>
																	<td>
                                                                       <div id="userRnTip" style="width: 250px"></div>
																	</td>
																</tr>
															</table>
															<table border="0" cellpadding="0" cellspacing="0"
																style="margin: 2px 0 0 75px">
																<tr>
																	<td style="padding: 6px 0 0 0px">
																		<input name="userPwd" type="password" class="input3" id="password1"/>
																	</td>
																	<td>
                                                                        <div id="password1Tip" style="width: 250px"></div>
																	</td>
																</tr>
															</table>

															<table border="0" cellpadding="0" cellspacing="0"
																style="margin: 2px 0 0 75px">
																<tr>
																	<td style="padding: 6px 0 0 0px">
																		<input type="password" class="input3" id="password2"/>
																	</td>
																	<td>
                                                                        <div id="password2Tip" style="width: 250px"></div>
																	</td>
																</tr>
															</table>
															<table border="0" cellpadding="0" cellspacing="0"
																style="margin: 2px 0 0 75px">
																<tr>
																	<td style="padding: 7px 0 0 0px">
																		<input name="email" type="text" class="input4" id="email"/>
																	</td>
																	<td>
                                                                        <div id="emailTip" style="width: 250px"></div>
																	</td>
																</tr>
															</table>
															<table border="0" cellpadding="0" cellspacing="0"
																style="margin: 5px 0 0 75px">
																<tr>
																	<td style="padding: 3px 0 0 0px">
																		<input name="telephone" type="text" class="input3" id="shouji"/>
																	</td>
																	<td>
																	<div id="shoujiTip" style="width: 250px"></div>
																	</td>
																</tr>
															</table>
															<table border="0" cellpadding="0" cellspacing="0"
																style="margin: 5px 0 0 75px">
																<tr>
																	<td style="padding: 6px 0 0 0px">
																		<input name="address" type="text" class="input5" id="ms"/>
																	</td>
																	<td>
									                                    <div id="msTip" style="width: 250px"></div>
																	</td>
																</tr>
															</table>
															<br />
															<table border="0" cellpadding="0" cellspacing="0">
																<tr>
																	<td>
																		<input type="checkbox" name="isAccept" value="Y"/>
																	</td>
																	<td>
																		<div style="margin: 4px 0 0 5px; color: #a1a1a1">
																			你是否愿意接收来自LG的新产品，活动等相关信息。我们保证你的信息将不会用于其它用途或第三方。
																		</div>
																	</td>
																</tr>
															</table>
															<br />
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
									<br />
									<table border="0" cellpadding="0" cellspacing="0"
										align="center">
										<tr>
											<td>
											<input type="submit" name="button" id="button" value="提交" />
											</td>
											<td>
												&nbsp;
											</td>
											<td>
											<input type="reset" name="button" value="取消" />
											</td>
										</tr>
									</table>
								</div>
							</td>
						</tr>
					</table>
					</form>
				</td>
			</tr>
		</table>
		<jsp:include page="./foot.jsp" />
			<script>
	function tipmsg(){
	   var msg = '${msg}';
	   if(msg != '')
	   {
	      alert(msg);
	   }
	}
	tipmsg();
	</script>
	</body>
</html>